package com.ss.android.article.base.feature.app;

import android.app.Activity;
import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.ss.android.article.browser.R;
import com.ss.android.common.lib.MobClickCombiner;

public final class bb extends Dialog {
    Context a;
    String b;
    private ImageView c;
    private ImageView d;
    private TextView e;
    private TextView f;
    private Button g;

    public bb(Context context, String arg4) {
        super(context, R.style.ef);
        this.setContentView(com.ss.android.article.browser.R.layout.h9);
        this.c = this.findViewById(com.ss.android.article.browser.R.id.a7j);
        this.e = this.findViewById(com.ss.android.article.browser.R.id.content_title);
        this.f = this.findViewById(com.ss.android.article.browser.R.id.content_text);
        this.d = this.findViewById(com.ss.android.article.browser.R.id.a7k);
        this.g = this.findViewById(com.ss.android.article.browser.R.id.a7m);
        this.c.setOnClickListener(new cc(this));
        this.setCanceledOnTouchOutside(true);
        this.a = context;
        this.b = arg4;
    }

    final void a() {
        if(((this.a instanceof Activity)) && !((Activity)this.a).isFinishing() && (this.isShowing())) {
            this.dismiss();
        }
    }

    public final void a(int arg2, int arg3, int arg4) {
        this.d.setImageResource(arg2);
        this.e.setText(arg3);
        this.f.setText(arg4);
    }

    public final void a(int arg3, View.OnClickListener arg4) {
        this.g.setText(arg3);
        this.g.setOnClickListener(new dd(this, arg4));
    }

    public final void show() {
        super.show();
        MobClickCombiner.onEvent(this.a, "pop", this.b + "_show");
    }
}

